package com.ws.entity.test02;

import java.util.Scanner;

/**
 * @author 王硕
 * @version jdk21
 * @className Garage
 * @description
 * @date 2024/11/5 19:06
 */
public class Garage {
    //修理厂名称
    public String name;
    //修理厂地址
    public String address;
    //修理厂电话
    public String telephone;



    public void carRepair(Car car){
        Scanner scanner = new Scanner(System.in);
        System.out.println("车辆将前往" + name + "修车厂进行维修。");
        System.out.println("输入y确定");
        String input = scanner.next();
        if ("y".equals(input)){
            car.wheel=4;
            System.out.println("车辆维修完成，现在可以正常行驶。");
        }else {
            System.out.println("你的车子无法上路");
            System.exit(0);
        }
    }

    public Garage() {
    }

    public Garage(String name, String address, String telephone) {
        this.name = name;
        this.address = address;
        this.telephone = telephone;
    }
}
